<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style></style>
  </head>

  <body>
    <script>
      // 随机排序-1-6
      // const arr = [1, 2, 3, 4, 5, 6]; 
      // arr.sort(() => Math.random() - 0.5); 
      // console.log(arr);

      // const obj = {a:1,b:2,c:3}

      // 数组排序
      const arr = [1,3,6,2,5]
      arr.sort((a,b)=> a-b)
      console.log(arr);

      // 数组去重
      const arr2 = [1,2,1,2]
      console.log([...new Set(arr2)])
    </script>
  </body>
</html>